package com.member.shop.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.member.common.annotation.Excel;
import com.member.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDate;
import java.util.Date;

/**
 * 用户积分记录对象 sys_biz_user_integral_record
 *
 * @author thomas
 * @date 2024-10-27
 */
public class SysBizUserIntegralRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 唯一id
     */
    private Long id;

    /**
     * 用户id
     */

    private Long userId;

    /**
     * 用户昵称
     */
    @Excel(name = "用户昵称")
    private String userName;


    private LocalDate changeDate;

    public LocalDate getChangeDate() {
        return changeDate;
    }

    public void setChangeDate(LocalDate changeDate) {
        this.changeDate = changeDate;
    }

    /**
     * 手机号
     */
    @Excel(name = "手机号")
    private String phone;

    /**
     * 积分行为
     */
    @Excel(name = "行为")
    private String behavior;

    /**
     * 积分
     */
    @Excel(name = "积分")
    private Integer score;

    /**
     * 业务主键
     */

    private String bussKey;


    private Integer changeType;
    /**
     * 变更类型 1 奖励 2 抵扣
     */
    @Excel(name = "变更类型")
    private String changeTypeName;

    public String getChangeTypeName() {
        return changeTypeName;
    }

    public void setChangeTypeName(String changeTypeName) {
        this.changeTypeName = changeTypeName;
    }

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remarkInfo;

    public String getRemarkInfo() {
        return remarkInfo;
    }

    public void setRemarkInfo(String remarkInfo) {
        this.remarkInfo = remarkInfo;
    }

    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date insertTime;

    public Date getInsertTime() {
        return insertTime;
    }

    /**
     * 业务类型
     */

    private Integer bussType;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setBehavior(String behavior) {
        this.behavior = behavior;
    }

    public String getBehavior() {
        return behavior;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Integer getScore() {
        return score;
    }

    public void setBussKey(String bussKey) {
        this.bussKey = bussKey;
    }

    public String getBussKey() {
        return bussKey;
    }

    public void setChangeType(Integer changeType) {
        this.changeType = changeType;
    }

    public Integer getChangeType() {
        return changeType;
    }

    public void setBussType(Integer bussType) {
        this.bussType = bussType;
    }

    public Integer getBussType() {
        return bussType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("phone", getPhone())
                .append("behavior", getBehavior())
                .append("score", getScore())
                .append("bussKey", getBussKey())
                .append("changeType", getChangeType())
                .append("bussType", getBussType())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .toString();
    }
}
